// const path = require('path')
const { name } = require('./package')
const port = 7101
module.exports = {
	outputDir: 'dist',
	assetsDir: 'static',
	filenameHashing: true,
	devServer: {
		// host: '0.0.0.0',
		hot: true,
		disableHostCheck: true,
		port,
		overlay: {
			warnings: false,
			errors: true
		},
		// 跨域
		headers: {
			'Access-Control-Allow-Origin': '*'
		}
	},
	configureWebpack: {
		output: {
			filename: '[name].js',
			library: `${name}-[name]`,
			libraryTarget: 'umd',
			jsonpFunction: `webpackJsonp_${name}`
		}
	}
}
